<template>
  <div class="more-action">
      <!-- 第一个弹层 -->
      <van-cell-group v-if="!isShowAction">
        <van-cell title="不感兴趣" @click="$emit('dislike')"/>
        <van-cell title="反馈垃圾内容" is-link @click="isShowAction=true"/>
        <van-cell title="拉黑作者" />
      </van-cell-group>
      <!-- 第二个弹层 -->
       <van-cell-group v-else>
        <van-cell icon="arrow-left" title="返回" @click="isShowAction=false" />
        <van-cell
        v-for="item in reportTypeList"
        :key="item.value"
        @click="$emit('report', item.value)">
          {{item.label}}
        </van-cell>
      </van-cell-group>
  </div>
</template>

<script>
import reportTypeList from '@/constant/reports.js'
export default {
  name: 'MoreAction',
  data () {
    return {
      // reportTypeList: reportTypeList,
      reportTypeList,
      isShowAction: false // 判断第二个弹层
    }
  }
}
</script>

<style scoped lang="less">
.more-action {
  border-radius: 4px;
}
</style>
